import 'package:flutter/material.dart';

import 'package:get/get.dart';
import 'package:lottie/lottie.dart';

import '../controllers/not_found_controller.dart';

class NotFoundView extends GetView<NotFoundController> {
  const NotFoundView({super.key});
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Obx(() => Text(controller.title.value)),
        centerTitle: true,
      ),
      body: Column(
        children: [
          const SizedBox(
            height: 10,
          ),
          SizedBox(
            width: Get.width,
            height: 404,
            child: Lottie.asset('lib/assets/lottie/404.json'),
          ),
          const SizedBox(
            height: 10,
          ),
          const Text('系统错误啦，请返回重试'),
          const SizedBox(
            height: 10,
          ),
          OutlinedButton(onPressed: () => Get.back(), child: const Text('返回'))
        ],
      ),
    );
  }
}
